home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / telecom / 96 / c / signal.doc < prev    next >
Encoding:
Internet Message Format  |  1987-01-15  |  1.2 KB

  1. Subject: A replacement for Alcyon's signal function
  2.  
  3. I couldn't get the Alcyon signal function to work properly, and when I
  4. traced through it I discovered that it still calls the bdos set exception
  5. function which worked on cp/m68k systems, but apparently not on the ST.
  6. So I wrote a new signal to replace the old one.  And since the ST has
  7. a few more options than vanilla cp/m68k, I added some additional signals.
  8. You can use this to set a trap for CNTRL-C, but be advised that you'll
  9. have to write your own error handler, and it's probably best to check and
  10. save the old value before you set it.  (Just like the original signal, this
  11. function does not save the old vectors for you.)  BTW the way cp/m68k handled
  12. the setting of exceptions (unless you used a bios call) was to fiddle with
  13. a structure of the following type passed in d1
  14. struct epb {
  15.        int vecnum;
  16.        long newvec;   /* supplied by the caller */
  17.        long oldvec;   /*filled in by the bdos */
  18. };
  19.  
  20. And now a question.  The bdos calls (trap #2) do not seem to be documented
  21. anywhere.  Some are identical to cp/m68k calls, but others are in no way
  22. the same.  Does anyone have a list of the functions and what they do?
  23.